/* ===== Relearn 下的首页卡片排版修复 ===== */

/* 主体容器命中，避免被主题样式盖住 */
#R-body-inner .grid.cards{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 1rem 0 2rem;
  list-style: none;
  padding: 0;
}

/* 把“药丸链接”恢复成真正的卡片块 */
#R-body-inner .grid.cards .card{
  display: block;
  box-sizing: border-box;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fafafa;
  text-decoration: none !important;   /* 覆盖主题的链接样式 */
  color: inherit !important;          /* 继承正文颜色 */
  line-height: 1.6;
  transition: all .25s ease-in-out;
}

/* 悬停更有“呼吸” */
#R-body-inner .grid.cards .card:hover{
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0,0,0,.08);
  background: #fff;
}

/* 标题视觉层级 */
#R-body-inner .grid.cards .card strong{
  display: block;
  font-size: 1.05rem;
  margin-bottom: 4px;
}

/* 让主题别给卡片里的 a 再上装饰 */
#R-body-inner .grid.cards .card a{
  text-decoration: none !important;
  color: inherit !important;
}

/* 正文与引言的微调（可保留） */
#R-body-inner h1{
  font-weight: 600;
  letter-spacing: 1px;
  color: #222;
}
#R-body-inner p{
  font-size: 1.05rem;
  line-height: 1.9;
  margin-bottom: 1em;
}
/* 引言块样式（色调加深，更有厚度） */
#R-body-inner blockquote {
  border-left: 4px solid #555;       /* 左侧竖线更深灰 */
  padding: 1.2em 1.4em;
  color: #444;                       /* 字色更深，近正文色 */
  font-style: italic;
  background: #dcdcdc;               /* 背景更稳重的灰 */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);  /* 增加深度阴影 */
  border-radius: 6px;
  line-height: 1.9;
  transition: all 0.3s ease;
}

/* 悬停微微提亮——如光自内散开 */
#R-body-inner blockquote:hover {
  background: #e0e0e0;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}



/* 窄屏下自动一列 */
@media (max-width: 720px){
  #R-body-inner .grid.cards{ grid-template-columns: 1fr; }
}

/* ========== 调整“编”级页面标题字号 ========== */

/* 只影响路径中包含 /part 的页面（即各编） */
body[data-url*="/part"] h1 {
  font-size: 2rem;   /* 默认约 2.2rem，可按需改成 1.5rem、1.4rem 等 */
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;}

  /* ========== Pure Suchness Codex 文本排版样式 ========== */
.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #222;
  border-left: 4px solid #444;
  padding-left: 10px;
  margin-top: 2.5em;
  margin-bottom: 1em;
  letter-spacing: 0.5px;
}

.article {
  margin-left: 1em;
  margin-bottom: 2em;
}

.clause, .theorem, .definition, .proof, .note, .corollary {
  font-weight: 600;
  color: #333;
  margin-top: 1em;
  margin-bottom: 0.5em;
}

.text {
  line-height: 1.9;
  margin-bottom: 0.8em;
  font-size: 1.02rem;
}

.comment {
  font-style: italic;
  color: #444;
  background-color: #fafafa;
  border-left: 3px solid #ccc;
  padding: 0.5em 1em;
  border-radius: 4px;
  margin-bottom: 1em;
}

.proof-list {
  margin-left: 2em;
  line-height: 1.8;
}

.end {
  font-weight: 700;
  margin-left: 0.3em;
}

hr {
  border: 0;
  height: 1px;
  background: #ddd;
  margin: 2em 0;
}

/* ====== Codex：条文 / 公设 / 命题 / 定理 的版式系统 ====== */

/* 小节标题（§2.x） */
.section-title{
  font-size: 1.25rem;
  font-weight: 700;
  color: #2f2f2f;
  border-left: 4px solid #7a7a7a;
  padding-left: 10px;
  margin-top: 2.2em;
  margin-bottom: 0.9em;
  letter-spacing: .3px;
}

/* 章节容器 */
.article{ margin-left: .2rem; margin-bottom: 1.4em; }

/* 基本文段 */
.text{ line-height: 1.9; margin: .5em 0 .9em; font-size: 1.02rem; }

/* 注解/附释 */
.comment{
  font-style: italic;
  color:#444; background:#fafafa;
  border-left: 3px solid #bcbcbc;
  padding:.6em 1em; border-radius:5px; margin:.6em 0 1.2em;
}
.comment.fine{ font-size:.98rem; color:#555; }

/* 徽标：D/P/命题/定理 */
.badge{
  display:inline-block; min-width:2.2em; padding:.06em .45em;
  border-radius:.4em; font-weight:700; font-size:.9rem;
  line-height:1.2; text-align:center; margin-right:.5em;
  border:1px solid rgba(0,0,0,.08);
  background: linear-gradient(#fff,#f4f4f4);
}
.badge.D{ color:#324f7a; border-color:#cfd9ea; background:linear-gradient(#f7faff,#ecf2ff); }
.badge.P{ color:#6a3b00; border-color:#ead9cf; background:linear-gradient(#fff8f1,#ffefe0); }

/* 列表：定义/公设/证明 */
.axiomlist{ list-style:none; padding-left:0; margin:.2em 0 1.2em; }
.axiomlist li{ margin:.35em 0; line-height:1.85; }
.deflist li b{ color:#222; }

/* 命题/定义/证明/推论标题 */
.theorem, .definition, .proof, .note, .corollary{
  font-weight:700; color:#2b4f81; margin:.6em 0 .2em;
}
.theorem.major{ font-size:1.08rem; color:#223a60; border-left:3px solid #223a60; padding-left:.5em; }
.proof{ color:#6b2a00; } /* 证明标题微褐，和公设系呼应 */
.proof-list{ margin-left:1.6em; line-height:1.85; }
.end{ font-weight:800; margin-left:.25em; }

/* 引句式定理陈述（终行） */
.epigraph{
  font-style: italic; text-align:center; color:#333;
  background: #f7f7f7; border:1px dashed #d5d5d5;
  padding:1em; border-radius:8px; margin-top:.8em;
}

/* 分隔线 */
hr{ border:0; height:1px; background:#e5e5e5; margin:1.6em 0; }

/* ==== 卷首 · 序言卡（统一风格） ==== */
.preface{
  position: relative;
  margin: 1.2rem 0 2rem;
  padding: 1.1rem 1.2rem 1.2rem;
  background: #faf9f7;
  border: 1px solid #eadfd2;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(0,0,0,.04);
}
.preface-badge{
  display: inline-block;
  font-weight: 700;
  font-size: .9rem;
  color: #7a521a;
  background: linear-gradient(#fff6e5,#ffedd0);
  border: 1px solid #e9d2a8;
  padding: .18rem .6rem;
  border-radius: 999px;
  margin-bottom: .35rem;
}
.preface-title{
  font-size: 1.15rem;
  font-weight: 700;
  color: #2f2f2f;
  letter-spacing: .3px;
  margin: .2rem 0 .6rem;
}
.preface-body{
  line-height: 1.9;
  color: #3a3a3a;
  font-size: 1.03rem;
}

/* 序言卡与页面标题的距离（只在卷首页更优雅） */
body[data-url$="/volumes/"] .preface,
body[data-url*="/volumes/volume1/index.html"] .preface,
body[data-url*="/volumes/volume2/index.html"] .preface,
body[data-url*="/volumes/volume3/index.html"] .preface{
  margin-top: .8rem;
}

/* 与你现有“碑文体”保持一致的细节 */
.epigraph b { color:#222; }